<?php

use mindplay\vite\Manifest;

require __DIR__."/../vendor/autoload.php";
$appConfig = json_encode([
    'globals'=>['test'=>1],
    'homePage'=> "/home",
    'namespace'=> "vben-web-naive",
    'baseURL'=> "/index.php",
], JSON_UNESCAPED_UNICODE);
$vite = new Manifest(false,'./build/manifest.json', "./build/");
$tags = $vite->createTags("src/main.ts");
//dump($tags->preload);
//dump($tags->css);
//dump($tags->js);
//dump($vite->getURL("php.svg"));
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Vite App</title>
    <link rel="icon" href="" />
    <script type="module">
        window._VBEN_ADMIN_PRO_APP_CONF_ = {
            // VITE_GLOB_API_URL:"https://mock-napi.vben.pro/api",
            VITE_GLOB_API_URL:"/index.php",
        }
        Object.freeze(window._VBEN_ADMIN_PRO_APP_CONF_);
        Object.defineProperty(window,"_VBEN_ADMIN_PRO_APP_CONF_",{configurable:false,writable:false,});
        window.appConfig = <?= $appConfig ?>;
    </script>
    <?= $tags->preload ?>
    <?= $tags->css ?>
</head>
<body>
    <div id="app">

    </div>
    <?= $tags->js ?>
</body>
</html>